home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / Alpha-HOWTO < prev    next >
Text File  |  1997-09-02  |  23KB  |  467 lines

  1.   Brief Introduction to Alpha Systems and Processors
  2.   Neal Crook, Digital Equipment (Editor: David Mosberger
  3.   <mailto:davidm@azstarnet.com>)
  4.   V0.11, 6 June 1997
  5.  
  6.   This document is a brief overview of existing Alpha CPUs, chipsets and
  7.   systems. It has something of a hardware bias, reflecting my own area
  8.   of expertese. Although I am an employee of Digital Equipment Corpora¡
  9.   tion, this is not an official statement by Digital and any opinions
  10.   expressed are mine and not Digital's.
  11.  
  12.   1.  What is Alpha
  13.  
  14.   "Alpha" is the name given to Digital's 64-bit RISC architecture. The
  15.   Alpha project in Digital began in mid-1989, with the goal of providing
  16.   a high-performance migration path for VAX customers. This was not the
  17.   first RISC architecture to be produced by Digital, but it was the
  18.   first to reach the market. When Digital announced Alpha, in March
  19.   1992, it made the decision to enter the merchant semicondutor market
  20.   by selling Alpha microprocessors.
  21.  
  22.   Alpha is also sometimes referred to as Alpha AXP, for obscure and
  23.   arcane reasons that aren't worth persuing. Suffice it to say that they
  24.   are one and the same.
  25.  
  26.   2.  What is Digital Semiconductor
  27.  
  28.   Digital Semiconductor <http://www.digital.com/info/semiconductor/>
  29.   (DS) is the business unit within Digital Equipment Corporation
  30.   (Digital - we don't like the name DEC) that sells semiconductors on
  31.   the merchant market. Digital's products include CPUs, support
  32.   chipsets, PCI-PCI bridges and PCI peripheral chips for comms and
  33.   multimedia.
  34.  
  35.   3.  Alpha CPUs
  36.  
  37.   There are currently 2 generations of CPU core that implement the Alpha
  38.   architecture:
  39.  
  40.   ╖  EV4
  41.  
  42.   ╖  EV5
  43.  
  44.   Opinions differ as to what "EV" stands for (Editor's note: the true
  45.   answer is of course "Electro Vlassic" ``[1]''), but the number
  46.   represents the first generation of Digital's CMOS technology that the
  47.   core was implemented in. So, the EV4 was originally implemented in
  48.   CMOS4. As time goes by, a CPU tends to get a mid-life performance kick
  49.   by being optically shrunk into the next generation of CMOS process.
  50.   EV45, then, is the EV4 core implemented in CMOS5 process. There is a
  51.   big difference between shrinking a design into a particular technology
  52.   and implementing it from scratch in that technology (but I don't want
  53.   to go into that now). There are a few other wildcards in here: there
  54.   is also a CMOS4S (optical shrink in CMOS4) and a CMOS5L.
  55.  
  56.   True technophiles will be interested to know that CMOS4 is a 0.75
  57.   micron process, CMOS5 is a 0.5 micron process and CMOS6 is a 0.35
  58.   micron process.
  59.  
  60.   To map these CPU cores to chips we get:
  61.  
  62.      21064-150,166
  63.         EV4 (originally), EV4S (now)
  64.  
  65.      21064-200
  66.         EV4S
  67.  
  68.      21064A-233,275,300
  69.         EV45
  70.  
  71.      21066
  72.         LCA4S (EV4 core, with EV4 FPU)
  73.  
  74.      21066A-233
  75.         LCA45 (EV4 core, but with EV45 FPU)
  76.  
  77.      21164-233,300,333
  78.         EV5
  79.  
  80.      21164A-417
  81.         EV56
  82.  
  83.      21264
  84.         EV6 <http://www.mdronline.com/report/articles/21264/21264.html>
  85.  
  86.   The EV4 core is a dual-issue (it can issue 2 instructions per CPU
  87.   clock) superpipelined core with integer unit, floating point unit and
  88.   branch prediction. It is fully bypassed and has 64-bit internal data
  89.   paths and tightly coupled 8Kbyte caches, one each for Instruction and
  90.   Data. The caches are write-through (they never get dirty).
  91.  
  92.   The EV45 core has a couple of tweaks to the EV4 core: it has a
  93.   slightly improved floating point unit, and 16KB caches, one each for
  94.   Instruction and Data (it also has cache parity).  (Editor's note: Neal
  95.   Crook indicated in a separate mail that the changes to the floating
  96.   point unit (FPU) improve the performance of the divider.  The EV4 FPU
  97.   divider takes 34 cycles for a single-precision divide and 63 cycles
  98.   for a double-precision divide (non data-dependent).  In constrast, the
  99.   EV45 divider takes typically 19 cycles (34 cycles max) for single-
  100.   precision and typically 29 cycles (63 cycles max) for a double-
  101.   precision division (data-dependent).)
  102.  
  103.   The EV5 core is a quad-issue core, also superpipelined, fully bypassed
  104.   etc etc. It has tightly-coupled 8Kbyte caches, one each for I and D.
  105.   These caches are write-through. It also has a tightly-coupled 96Kbyte
  106.   on-chip second-level cache (the Scache) which is 3-way set associative
  107.   and write-back (it can be dirty). The EV4->EV5 performance increase is
  108.   better than just the increase achieved by clock speed improvements. As
  109.   well as the bigger caches and quad issue, there are microarchitectural
  110.   improvements to reduce producer/consumer latencies in some paths.
  111.  
  112.   The EV56 core is fundamentally the same microarchitecture as the EV5,
  113.   but it adds some new instructions for 8 and 16-bit loads and stores
  114.   (see Section ``Bytes and all that stuff''). These are primarily
  115.   intended for use by device drivers. The EV56 core is implemented in
  116.   CMOS6, which is a 2.0V process.
  117.  
  118.   The 21064 was anounced in March 1992. It uses the EV4 core, with a
  119.   128-bit bus interface. The bus interface supports the 'easy'
  120.   connection of an external second-level cache, with a block size of
  121.   256-bits (2 data beats on the bus). The Bcache timing is completely
  122.   software configurable. The 21064 can also be configured to use a
  123.   64-bit external bus, (but I'm not sure if any shipping system uses
  124.   this mode). The 21064 does not impose any policy on the Bcache, but it
  125.   is usually configured as a write-back cache. The 21064 does contain
  126.   hooks to allow external hardware to maintain cache coherence with the
  127.   Bcache and internal caches, but this is hairy.
  128.  
  129.   The 21066 uses the EV4 core and integrates a memory controller and PCI
  130.   host bridge. To save pins, the memory controller has a 64-bit data bus
  131.   (but the internal caches have a block size of 256 bits, just like the
  132.   21064, therefore a block fill takes 4 beats on the bus). The memory
  133.   controller supports an external Bcache and external DRAMs. The timing
  134.   of the Bcache and DRAMs is completely software configurable, and can
  135.   be controlled to the resolution of the CPU clock period. Having a
  136.   4-beat process to fill a cache block isn't as bad as it sounds because
  137.   the DRAM access is done in page mode. Unfortunately, the memory
  138.   controller doesn't support any of the new esoteric DRAMs (SDRAM, EDO
  139.   or BEDO) or synchronous cache RAMs. The PCI bus interface is fully
  140.   rev2.0 compliant and runs at upto 33MHz.
  141.  
  142.   The 21164 has a 128-bit data bus and supports split reads, with upto 2
  143.   reads outstanding at any time (this allows 100% data bus utilisation
  144.   under best-case dream-on conditions, i.e., you can theoretically
  145.   transfer 128-bits of data on every bus clock). The 21164 supports easy
  146.   connection of an external 3-rd level cache (Bcache) and has all the
  147.   hooks to allow external systems to maintain full cache coherence with
  148.   all caches. Therefore, symmetric multiprocessor designs are 'easy'.
  149.  
  150.   The 21164A was announced in October, 1995. It uses the EV56 core. It
  151.   is nominally pin-compatible with the 21164, but requires split power
  152.   rails; all of the power pins that were +3.3V power on the 21164 have
  153.   now been split into two groups; one group provided 2.0V power to the
  154.   CPU core, the other group supplies 3.3V to the I/O cells. Unlike older
  155.   implementations, the 21164 pins are not 5V-tolerant. The end result of
  156.   this change is that 21164 systems are, in general, not upgradeable to
  157.   the 21164A (though note that it would be relatively straightforward to
  158.   design a 21164A system that could also accommodate a 21164). The
  159.   21164A also has a couple of new pins to support the new 8 and 16-bit
  160.   loads and stores. It also improves the 21164 support for using
  161.   synchronus SRAMs to implement the external Bcache.
  162.  
  163.   4.  21064 performance vs 21066 performance
  164.  
  165.   The 21064 and the 21066 have the same (EV4) CPU core. If the same
  166.   program is run on a 21064 and a 21066, at the same CPU speed, then the
  167.   difference in performance comes only as a result of system
  168.   Bcache/memory bandwidth. Any code thread that has a high hit-rate on
  169.   the internal caches will perform the same. There are 2 big performance
  170.   killers:
  171.  
  172.   1. Code that is write-intensive. Even though the 21064 and the 21066
  173.      have write buffers to swallow some of the delays, code that is
  174.      write-intensive will be throttled by write bandwidth at the system
  175.      bus. This arises because the on-chip caches are write-through.
  176.  
  177.   2. Code that wants to treat floats as integers. The Alpha architecture
  178.      does not allow register-register transfers from integer registers
  179.      to floating point registers. Such a conversion has to be done via
  180.      memory (And therefore, because the on-chip caches are write-
  181.      through, via the Bcache).  (Editor's note: it seems that both the
  182.      EV4 and EV45 can perform the conversion through the primary data
  183.      cache (Dcache), provided that the memory is cached already.  In
  184.      such a case, the store in the conversion sequence will update the
  185.      Dcache and the subsequent load is, under certain circumstances,
  186.      able to read the updated d-cache value, thus avoiding a costly
  187.      roundtrip to the Bcache.  In particular, it seems best to execute
  188.      the stq/ldt or stt/ldq instructions back-to-back, which is somewhat
  189.      counter-intuitive.)
  190.  
  191.   If you make the same comparison between a 21064A and a 21066A, there
  192.   is an additional factor due to the different Icache and Dcache sizes
  193.   between the two chips.
  194.  
  195.   Now, the 21164 solves both these problems: it achieve much higher
  196.   system bus bandwidths (despite having the same number of signal pins -
  197.   yes, I know it's got about twice as many pins as a 21064, but all
  198.   those extra ones are power and ground! (yes, really!!))  and it has
  199.   write-back caches. The only remaining problem is the answer to the
  200.   question "how much does it cost?"
  201.  
  202.   5.  A Few Notes On Clocking
  203.  
  204.   All of the current Alpha CPUs use high-speed clocks, because their
  205.   microarchitectures have been designed as so-called short-tick designs.
  206.   None of the sytem busses have to run at horrendous speeds as a result
  207.   though:
  208.  
  209.   ╖  on the 21066(A), 21064(A), 21164 the off-chip cache (Bcache) timing
  210.      is completely programmable, to the resolution of the CPU clock. For
  211.      example, on a 275MHz CPU, the Bcache read access time can be
  212.      controller with a resolution of 3.6ns
  213.  
  214.   ╖  on the 21066(A), the DRAM timing is completely programmable, to the
  215.      resolution of the CPU clock (not the PCI clock, the CPU clock).
  216.  
  217.   ╖  on the 21064(A), 21164(A), the system bus frequency is a sub-
  218.      multiple of the CPU clock frequency. Most of the 21064 motherboards
  219.      use a 33MHz system bus clock.
  220.  
  221.   ╖  Systems that use the 21066 can run the PCI at any frequency
  222.      relative to the CPU. Generally, the PCI runs at 33MHz.
  223.  
  224.   ╖  Systems that use the APECs chipset (see Section ``'') always have
  225.      their CPU system bus equal to their PCI bus frequency. This means
  226.      that both busses tends to run at either 25MHz or 33MHz (since these
  227.      are the frequencies that scale up to match the CPU frequencies). On
  228.      APECs systems, the DRAM controller timings are software
  229.      programmable in terms of the CPU system bus frequency
  230.  
  231.   Aside: someone suggested that they were getting bad performance on a
  232.   21066 because the 21066 memory controller was only running at 33MHz.
  233.   Actually, it's the superfast 21064A systems that have memory
  234.   controllers that 'only' run at 33MHz.
  235.  
  236.   6.  The chip-sets
  237.  
  238.   DS sells two CPU support chipsets. The 2107x chipset (aka APECS) is a
  239.   21064(A) support chiset. The 2117x chipset (aka ALCOR) is a 21164
  240.   support chipset. There will also be 2117xA chipset (aka ALCOR 2) as a
  241.   21164A support chipset.
  242.  
  243.   Both chipsets provide memory controllers and PCI host bridges for
  244.   their CPU. APECS provides a 32-bit PCI host bridge, ALCOR provides a
  245.   64-bit PCI host bridge which (in accordance with the requirements of
  246.   the PCI spec) can support both 32-bit and 64-bit PCI devices.
  247.  
  248.   APECS consists of 6, 208-pin chips (4, 32-bit data slices (DECADE), 1
  249.   system controller (COMANCHE), 1 PCI controller (EPIC)). It provides a
  250.   DRAM controller (128-bit memory bus) and a PCI interface. It also does
  251.   all the work to maintain memory coherence when a PCI device DMAs into
  252.   (or out of) memory.
  253.  
  254.   ALCOR consists of 5 chips (4, 64-bit data slices (Data Switch, DSW) -
  255.   208-pin PQFP and 1 control (Control, I/O Address, CIA) - a 383 pin
  256.   plastic PGA).  It provides a DRAM controller (256-bit memory bus) and
  257.   a PCI interface. It also does all the work required to support an
  258.   external Bcache and to maintain memory coherence when a PCI device
  259.   DMAs into (or out of) memory.
  260.  
  261.   There is no support chipset for the 21066, since the memory controller
  262.   and PCI host bridge functionality are integrated onto the chip.
  263.  
  264.   7.  The Systems
  265.  
  266.   The applications engineering group in DS produces example designs
  267.   using the CPUs and support chipsets. These are typically PC-AT size
  268.   motherboards, with all the functionality that you'd typically find on
  269.   a high-end Pentium motherboard. Originally, these example designs were
  270.   intended to be used as starting points for third-parties to produce
  271.   motherboard designs from. These first-generation designs were called
  272.   Evaluation Boards (EBs). As the amount of engineering required to
  273.   build a motherboard has increased (due to higher-speed clocks and the
  274.   need to meet RF emission and susceptibility regulations) the emphasis
  275.   has shifted towards providing motherboards that are suitable for
  276.   volume manufacture.
  277.  
  278.   Digital's system groups have produced several generations of machines
  279.   using Alpha processors. Some of these systems use support logic that
  280.   is designed by the systems groups, and some use commodity chipsets
  281.   from DS. In some cases, systems use a combination of both.
  282.  
  283.   Various third-parties build systems using Alpha processors. Some of
  284.   these companies design systems from scratch, and others use DS support
  285.   chipsets, clone/modify DS example designs or simply package systems
  286.   using build and tested boards from DS.
  287.  
  288.   The EB64: Obsolete design using 21064 with memory controller
  289.   implemented using programmable logic. I/O provided by using
  290.   programmable logic to interface a 486<->ISA bridge chip. On-board
  291.   Ethernet, SuperI/O (2S, 1P, FD), Ethernet and ISA. PC-AT size. Runs
  292.   from standard PC power supply.
  293.  
  294.   The EB64+: Uses 21064 or 21064A and APECs. Has ISA and PCI expansion
  295.   (3 ISA, 2 PCI, one pair are on a shared slot). Supports 36-bit DRAM
  296.   SIMs. ISA bus generated by Intel SaturnI/O PCI-ISA bridge. On-board
  297.   SCSI (NCR 810 on PCI) Ethernet (Digital 21040), KBD, MOUSE (PS2
  298.   style), SuperI/O (2S, 1P, FD), RTC/NVRAM. Boot ROM is EPROM. PC-AT
  299.   size. Runs from standard PC power supply.
  300.  
  301.   The EB66: Uses 21066 or 21066A. I/O sub-system is identical to EB64+.
  302.   Baby PC-AT size. Runs from standard PC power supply. The EB66
  303.   schematic was published as a marketing poster advertising the 21066 as
  304.   "the first microprocessor in the world with embedded PCI" (for trivia
  305.   fans: there are actually 2 versions of this poster - I drew the
  306.   circuits and wrote the spiel for the first version, and some Americans
  307.   mauled the spiel for the second version)
  308.  
  309.   The EB164: Uses 21164 and ALCOR. Has ISA and PCI expansion (3 ISA
  310.   slots, 2 64-bit PCI slots (one is shared with an ISA slot) and 2
  311.   32-bit PCI slots.  Uses plus-in Bcache SIMMs. I/O sub-system provides
  312.   SuperI/O (2S, 1P, FD), KBD, MOUSE (PS2 style), RTC/NVRAM. Boot ROM is
  313.   Flash. PC-AT-sized motherboard.  Requires power supply with 3.3V
  314.   output.
  315.  
  316.   The AlphaPC64 (aka Cabriolet): derived from EB64+ but now baby-AT with
  317.   Flash boot ROM, no on-board SCSI or Ethernet. 3 ISA slots, 4 PCI slots
  318.   (one pair are on a shared slot), uses plug-in Bcache SIMMs.  Requires
  319.   power supply with 3.3V output.
  320.  
  321.   The AXPpci33 (aka NoName), is based on the EB66. This design is
  322.   produced by Digital's Technical OEM (TOEM) group. It uses the 21066
  323.   processor running at 166MHz or 233MHz. It is a baby-AT size, and runs
  324.   from a standard PC power supply. It has 5 ISA slots and 3 PCI slots
  325.   (one pair are a shared slot). There are 2 versions, with either PS/2
  326.   or large DIN connectors for the keyboard.
  327.  
  328.   Other 21066-based motherboards: most if not all other 21066-based
  329.   motherboards on the market are also based on EB66 - there's really not
  330.   many system options when designing a 21066 system, because all the
  331.   control is done on-chip.
  332.  
  333.   Multia (aka the Universal Desktop Box): This is a very compact
  334.   pedestal desktop system based on the 21066. It includes 2 PCMCIA
  335.   sockets, 21030 (TGA) graphics, 21040 Ethernet and NCR 810 SCSI disk
  336.   along with floppy, 2 serial ports and a parallel port. It has limited
  337.   expansion capability (one PCI slot) due to its compact size. (There is
  338.   some restriction on when you can use the PCI slot, can't remember
  339.   what) (Note that 21066A-based and Pentium-based Multia's are also
  340.   available).
  341.  
  342.   DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one
  343.   of the first-generation Alpha systems. It is only mentioned here
  344.   because a number of these systems seem to be available on the second-
  345.   hand market. The Jensen is a floor-standing tower system which used a
  346.   150MHz 21064 (later versions used faster CPUs but I'm not sure what
  347.   speeds). It used programmable logic to interface a 486 EISA I/O bridge
  348.   to the CPU.
  349.  
  350.   Other 21064(A) systems: There are 3 or 4 motherboard designs around
  351.   (I'm not including Digital systems here) and all the ones I know of
  352.   are derived from the EB64+ design. These include:
  353.  
  354.   ╖  EB64+ (some vendors package the board and sell it unmodified); AT
  355.      form-factor.
  356.  
  357.   ╖  Aspen Systems motherboard: EB64+ derivative; baby-AT form-factor.
  358.  
  359.   ╖  Aspen Systems server board: many PCI slots (includes PCI bridge).
  360.  
  361.   ╖  AlphaPC64 (aka Cabriolet), baby AT form-factor.
  362.  
  363.   Other 21164(A) systems: The only one I'm aware of that isn't simply an
  364.   EB164 clone is a system made by DeskStation. That system is
  365.   implemented using a memory and I/O controller proprietary to Desk
  366.   Station. I don't know what their attitude towards Linux is.
  367.  
  368.   8.  Bytes and all that stuff
  369.  
  370.   When the Alpha architecture was introduced, it was unique amongst RISC
  371.   architectures for eschewing 8-bit and 16-bit loads and stores. It
  372.   supported 32-bit and 64-bit loads and stores (longword and quadword,
  373.   in Digital's nomenclature). The co-architects (Dick Sites, Rich Witek)
  374.   justified this decision by citing the advantages:
  375.  
  376.   1. Byte support in the cache and memory sub-system tends to slow down
  377.      accesses for 32-bit and 64-bit quantities.
  378.  
  379.   2. Byte support makes it hard to build high-speed error-correction
  380.      circuitry into the cache/memory sub-system.
  381.  
  382.   Alpha compensates by providing powerful instructions for manipulating
  383.   bytes and byte groups within 64-bit registers. Standard benchmarks for
  384.   string operations (e.g., some of the Byte benchmarks) show that Alpha
  385.   performs very well on byte manipulation.
  386.  
  387.   The absence of byte loads and stores impacts some software semaphores
  388.   and impacts the design of I/O sub-systems. Digital's solution to the
  389.   I/O problem is to use some low-order address lines to specify the data
  390.   size during I/O transfers, and to decode these as byte enables. This
  391.   so-called Sparse Addressing wastes address space and has the
  392.   consequence that I/O space is non-contiguous (more on the intricacies
  393.   of Sparse Addressing when I get around to writing it). Note that I/O
  394.   space, in this context, refers to all system resources present on the
  395.   PCI and therefore includes both PCI memory space and PCI I/O space.
  396.  
  397.   With the 21164A introduction, the Alpha archtecture was ECO'd to
  398.   include byte addressing. Executing these new instructions on an
  399.   earlier CPU will cause an OPCDEC PALcode exception, so that the
  400.   PALcode will handle the access. This will have a performance impact.
  401.   The ramifications of this are that use of these new instructions (IMO)
  402.   should be restricted to device drivers rather than applications code.
  403.  
  404.   These new byte load and stores mean that future support chipsets will
  405.   be able to support contiguous I/O space.
  406.  
  407.   9.  PALcode and all that stuff
  408.  
  409.   This is a placeholder for a section explaining PALcode. I will write
  410.   it if there is sufficient interest.
  411.  
  412.   10.  Porting
  413.  
  414.   The ability of any Alpha-based machine to run Linux is really only
  415.   limited by your ability to get information on the gory details of its
  416.   innards. Since there are Linux ports for the E66, EB64+ and EB164
  417.   boards, all systems based on the 21066, 21064/APECS or 21164/ALCOR
  418.   should run Linux with little or no modification. The major thing that
  419.   is different between any of these motherboards is the way that they
  420.   route interrupts. There are three sources of interrupts:
  421.  
  422.   ╖  on-board devices
  423.  
  424.   ╖  PCI devices
  425.  
  426.   ╖  ISA devices
  427.  
  428.   All the systems use an Intel System I/O bridge (SIO) to act as a
  429.   bridge between PCI and ISA (the main I/O bus is PCI, the ISA bus is a
  430.   secondary bus used to support slow-speed and 'legacy' I/O devices).
  431.   The SIO contains the traditional pair of daisy-chained 8259s.
  432.  
  433.   Some systems (e.g., the Noname) route all of their interrupts through
  434.   the SIO and thence to the CPU. Some systems have a separate interrupt
  435.   controller and route all PCI interrupts plus the SIO interrupt (8259
  436.   output) through that, and all ISA interrupts through the SIO.
  437.  
  438.   Other differences between the systems include:
  439.  
  440.   ╖  how many slots they have
  441.  
  442.   ╖  what on-board PCI devices they have
  443.  
  444.   ╖  whether they have Flash or EPROM
  445.  
  446.   11.  More Information
  447.  
  448.   All of the DS evaluation boards and motherboard designs are license-
  449.   free and the whole documentation kit for a design costs about 0. That
  450.   includes all the schematics, programmable parts sources, data sheets
  451.   for CPU and support chipset. The doc kits are available from Digital
  452.   Semiconductor distributors. I'm not suggesting that many people will
  453.   want to rush out and buy this, but I do want to point out that the
  454.   information is available.
  455.  
  456.   Hope that was helpful. Comments/updates/suggestions for expansion to
  457.   Neal Crook <mailto:neal.crook@reo.mts.digital.com>.
  458.  
  459.   12.  References
  460.  
  461.   [1]
  462.   <http://www.research.digital.com/wrl/publications/abstracts/TN-13.html>
  463.   Bill Hamburgen, Jeff Mogul, Brian Reid, Alan Eustace, Richard Swan,
  464.   Mary Jo Doherty, and Joel Bartlett.  Characterization of Organic
  465.   Illumination Systems.  DEC WRL, Technical Note 13, April 1989.
  466.  
  467.